<template>
  <div class="Showcase1">
    <div class="shadow-box">
      <div class="shadow-box-top">
        <img
          class="shadow-box-top-left"
          :src="publicUrls + 'free/style12/Showcase1dy1.webp'"
          alt=""
        />
        <div
          class="shadow-box-top-center"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1dy2.webp'})`,
          }"
        ></div>
        <img
          class="shadow-box-top-right"
          :src="publicUrls + 'free/style12/Showcase1dy3.webp'"
          alt=""
        />
      </div>
      <div class="shadow-box-center">
        <div
          class="shadow-box-center-left"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1dy4.webp'})`,
          }"
        ></div>
        <div
          class="shadow-box-center-center"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1dy5.webp'})`,
          }"
        ></div>
        <div
          class="shadow-box-center-right"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1dy6.webp'})`,
          }"
        ></div>
      </div>
      <div class="shadow-box-bottom">
        <img
          class="shadow-box-bottom-left"
          :src="publicUrls + 'free/style12/Showcase1dy7.webp'"
          alt=""
        />
        <div
          class="shadow-box-bottom-center"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1dy8.webp'})`,
          }"
        ></div>
        <img
          class="shadow-box-bottom-right"
          :src="publicUrls + 'free/style12/Showcase1dy9.webp'"
          alt=""
        />
      </div>
    </div>
    <div class="Showcase1-top">
      <img
        class="Showcase1-top-left"
        :src="publicUrls + 'free/style12/Showcase1bg1.webp'"
        alt=""
      />
      <div
        class="Showcase1-top-center"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg2.webp'})`,
        }"
      ></div>
      <img
        class="Showcase1-top-right"
        :src="publicUrls + 'free/style12/Showcase1bg3.webp'"
        alt=""
      />
    </div>
    <div class="Showcase1-center">
      <div
        class="Showcase1-center-left"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg4.webp'})`,
        }"
      ></div>
      <div class="Showcase1-center-center"  :style="{
          backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg5.webp'})`,
        }"></div>
      <div
        class="Showcase1-center-right"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg6.webp'})`,
        }"
      ></div>
    </div>
    <div class="Showcase1-bottom">
      <div
        :style="{
          left: `${ShowcaseItemTransform(item.x ? item.x : getParentX(index), item.width, 0.8958)}rem`,
        }"
        class="ex-item"
        v-for="(item, index) in props.list"
        :key="index"
      >
        <div
          class="name-box"
          :style="{ backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg10.webp'})` }"
        >
          <div class="name-item">{{ item.name }}</div>
        </div>
        <div
          class="name-bottom"
          :style="{
            backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg11.webp'})`,
          }"
        ></div>
      </div>
      <img
        class="Showcase1-bottom-left"
        :src="publicUrls + 'free/style12/Showcase1bg7.webp'"
        alt=""
      />
      <div
        class="Showcase1-bottom-center"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style12/Showcase1bg8.webp'})`,
        }"
      ></div>
      <img
        class="Showcase1-bottom-right"
        :src="publicUrls + 'free/style12/Showcase1bg9.webp'"
        alt=""
      />
    </div>
    <!-- Showcase1Topleft -->
  </div>
</template>   

<script lang="ts">
export default defineComponent({
  name: 'style1',
});
</script>
  
<script setup lang="ts">
import { ShowcaseItemTransform } from '@/utils/setmaterialStyle';
import { publicUrls } from '@/utils/minxin';
import { defineComponent } from 'vue';
const props = defineProps({
  list: {
    type: Object,
  },
});
// 1.30
const getParentX = (indexs: number) => {
  let x = 0;
  for (let index = 0; index < indexs; index++) {
    // const element = array[index];
    x = x + props.list[index].width;
  }

  return x + 0.3;
};
</script>   

<style scoped lang="less">
.Showcase1 {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 501px;
  min-width: 215px;
  // -webkit-box-reflect: below 0% linear-gradient(transparent, rgba(0, 0, 0, 0.2));
}
.Showcase1-top {
  display: flex;
  width: 100%;
  height: 90px;
}
.Showcase1-top-left {
  width: 78px;
  height: 90px;
}
.Showcase1-top-center {
  flex: 1;
  height: 90px;
  background-repeat: repeat;
  background-size: auto 100%;
}
.Showcase1-top-right {
  width: 88px;
  height: 90px;
}
.Showcase1-center {
  position: relative;
  display: flex;
  width: 100%;
  height: calc(100% - 315px);
}
.ex-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  bottom: 0px;
  width: 129px;
  z-index: 10;
}
.name-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 129px;
  height: 50px;
  background-size: 100% 100%;
  background-repeat: no-repeat;

  .name-item {
    width: 78px;
    height: 32px;
    font-family: PingFang SC;
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: rgba(254, 198, 75, 1);
  }
}
.name-bottom {
  margin-top: 35px;
  width: 76px;
  height: 58px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.Showcase1-center-left {
  width: 78px;
  height: 100%;
  background-size: 78px 100%;
  background-repeat: repeat;
}
.Showcase1-center-center {
  position: relative;
  flex: 1;
  height: 100%;
  background-repeat: repeat;
  background-size: auto 100%;
}
.Showcase1-center-right {
  width: 88px;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% 100%;
}
.Showcase1-bottom {
  position: relative;
  display: flex;
  width: 100%;
  height: 225px;
}
.Showcase1-bottom-left {
  width: 78px;
  height: 225px;
}
.Showcase1-bottom-center {
  flex: 1;
  height: 225px;
  background-repeat: repeat;
  background-size: auto 100%;
}
.Showcase1-bottom-right {
  width: 88px;
  height: 225px;
}
.shadow-box {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: calc(-100% + 16px);
  left: 0;
  z-index: -1;

  width: 100%;
  height: calc(100%);
  min-height: 536px;
}
.shadow-box-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 241px;
}
.shadow-box-top-left {
  width: 78px;
  height: 225px;
}
.shadow-box-top-center {
  flex: 1;
  height: 225px;
  background-repeat: repeat;
  background-size: auto 100%;
}
.shadow-box-top-right {
  width: 88px;
  height: 241px;
}
.shadow-box-center {
  position: relative;
  display: flex;
  width: 100%;
  height: calc(100% - 331px);
}
.shadow-box-center-left {
  width: 78px;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% auto;
}
.shadow-box-center-center {
  flex: 1;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% 100%;
}
.shadow-box-center-right {
  width: 88px;
  height: 100%;
  background-repeat: repeat;
  background-size: 100% auto;
}
.shadow-box-bottom {
  position: relative;
  display: flex;
  width: 100%;
  height: 90px;
}
.shadow-box-bottom-left {
  width: 78px;
  height: 90px;
}
.shadow-box-bottom-center {
  flex: 1;
  height: 90px;
  background-repeat: repeat;
  background-size: 100% 100%;
}
.shadow-box-bottom-right {
  width: 88px;
  height: 90px;
}
</style>